import { ApiProperty } from '@nestjs/swagger';
import { UserType } from '../../../../role/constants/role.constant';

class GetUserPagedListAdminResDtoData {
  @ApiProperty({ description: '用户uuid' })
  readonly uuid: string;

  @ApiProperty({ description: '用户类型' })
  readonly type: UserType;

  @ApiProperty({ description: '用户名' })
  readonly username: string;

  @ApiProperty({ description: '用户显示名称' })
  readonly display_name: string;

  @ApiProperty({ description: '头像地址' })
  readonly avatar_url: string;

  @ApiProperty({ description: '邮箱地址' })
  readonly email: string;

  @ApiProperty({ description: '手机号码' })
  readonly mobile: string;

  @ApiProperty({ description: '是否启用' })
  readonly active: boolean;

  @ApiProperty({ description: '用户岗位编号' })
  readonly job_id: number;

  @ApiProperty({ description: '用户组织编号列表' })
  readonly organization_id_list: number[];

  @ApiProperty({ description: '创建时间' })
  readonly created_at: Date;
}

export class GetUserPagedListAdminResDto {
  @ApiProperty({ description: '用户总数' })
  readonly total_count: number;

  @ApiProperty({ type: GetUserPagedListAdminResDtoData, isArray: true, description: '用户列表' })
  readonly data: GetUserPagedListAdminResDtoData[];
}
